{% extends 'rebs/layouts/base.html' %}

{% block title %}Rebs - Project{% endblock %}

{% block content %}
    {% load humanize %}

    <!-- Start Content-->
    <div class="container-fluid">

        <!-- start page title -->
        {% include 'rebs/partials/content_title.html' with  second_bs="신규 프로젝트" title="프로젝트 관리" %}
        <!-- end page title -->

        <div class="row">
            <div class="col-lg-12">
                <div class="card">
                    <div class="card-body">

                        {% with menu_order='1' %}
                            {% include 'rebs_project/partials/head_menu.html' %}
                        {% endwith %}

                        <div class="row">
                            <div class="col-sm-12 col-md-6">
                            </div>
                            <div class="col-sm-12 col-md-6">
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-12 table-responsive">
                                {#                                <div class="text-right"><a href="#"><i class="mdi mdi-file-excel-box"></i> Excel로 출력</a>#}
                            </div>
                            <table id="scroll-horizontal-datatable"
                                   class="table table-hover table-centered table-condensed table-sm w-100 m-0 nowrap">
                                <thead>
                                <tr class="bg-nav-pills">
                                    <th class="text-center">프로젝트 명</th>
                                    <th class="text-center">구 분</th>
                                    <th class="text-center">총 세대수(공급물량)</th>
                                    <th class="text-center">건축 규모</th>
                                    <th class="text-center">용도 지역</th>
                                    <th class="text-center">대지 면적</th>
                                    <th class="text-center">용적율</th>
                                    <th class="text-center">건폐율</th>
                                    <th class="text-center">
                                        <button type="button" class="btn"><i class="dripicons-document-edit"></i>
                                        </button>
                                    </th>
                                </tr>
                                </thead>
                                <tbody>
                                {% for object in object_list %}
                                    <tr>
                                        <td class="text-center"><a href="#">{{ object }}</a></td>
                                        <td class="text-center">{{ object.get_kind_display }}</td>
                                        <td class="text-right">
                                            {% if object.num_unit %}{{ object.num_unit|intcomma|default:"" }}
                                                세대{% endif %}</td>
                                        <td class="text-center">{{ object.build_size|truncatechars:30 }}</td>
                                        <td class="text-center">{{ object.area_usage|truncatechars:20 }}</td>
                                        <td class="text-right">{% if object.buy_land_extent %}
                                            {{ object.buy_land_extent|floatformat:"2"|intcomma }} m
                                            <sup>2</sup>{% endif %}</td>
                                        <td class="text-right">{% if object.floor_area_ratio %}
                                            {{ object.floor_area_ratio|floatformat:"2"|intcomma }} %{% endif %}</td>
                                        <td class="text-right">{% if object.build_to_land_ratio %}
                                            {{ object.build_to_land_ratio|floatformat:"2"|intcomma }} %{% endif %}</td>
                                        <td class="text-center">
                                            <button type="button" class="btn btn-light btn-sm text-success"><i
                                                    class="dripicons-document-edit"></i></button>
                                        </td>
                                    </tr>
                                {% endfor %}
                                </tbody>
                            </table>
                        </div>
                    </div>

                    {% if is_paginated %}

                        {# to_first_last :: 맨처음 / 맨끝으로 버튼 사용 여부 #}
                        {# page_class ex:: pagination-rounded pagination-sm pagination-lg justify-content-center justify-content-end #}
                        {% include 'partials/pagination.html' with to_first_last="ok" page_class="pagination-rounded justify-content-end" %}

                    {% endif %}
                </div>
            </div>
        </div>
    </div>

    </div> <!-- container -->

{% endblock %}
